AR	=ar
AS	=as --32
LD	=ld -m elf_i386
LDFLAGS	=-s -x
CC	=gcc
CFLAGS	=-Wall -g -m32 -fstrength-reduce -fno-stack-protector -fomit-frame-pointer \
	-no-pie -fno-pic -I../../include
CPP	=gcc -E -nostdinc -I../../include

.c.s:
	$(CC) $(CFLAGS) \
	-S -o $*.s $<
.s.o:
	$(AS) -o $*.o $<
.c.o:
	$(CC) $(CFLAGS) \
	-c -o $*.o $<

OBJS  = math_emulate.o

math.a: $(OBJS)
	$(AR) rcs math.a $(OBJS)
	sync

clean:
	rm -f core *.o *.a tmp_make
	for i in *.c;do rm -f `basename $$i .c`.s;done
